package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.business.domain.SysFileInfo;
import com.ruoyi.business.vo.SysFileInfoVo;
import com.ruoyi.business.mapper.SysFileInfoMapper;
import com.ruoyi.business.service.ISysFileInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 文件信息Service业务层处理
 *
 * @author Tellsea
 * @date 2023-02-08
 */
@Service
public class SysFileInfoServiceImpl extends ServiceImpl<SysFileInfoMapper, SysFileInfo> implements ISysFileInfoService {

    @Override
    public TableDataInfo<SysFileInfoVo> queryList(SysFileInfoVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<SysFileInfoVo> queryAll(SysFileInfoVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public SysFileInfoVo queryById(Long fileId) {
        return this.baseMapper.queryById(fileId);
    }

    @Override
    public int saveRtnId(SysFileInfoVo entity) {
        return this.baseMapper.saveRtnId(entity);
    }

    @Override
    public SysFileInfoVo getByFileId(Integer outlineId) {
        return this.baseMapper.getByFileId(outlineId);
    }
}
